﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using zsi.Framework.Data;
using zsi.Framework.Data.DataProvider.SQLServer;
using zsi.phgov.Models;
using System.Data;
using System.Data.SqlClient;
using zsi.phgov.Util;
using System.Web.Mvc;
namespace zsi.phgov.Models.DataControllers
{
    public class dcProfile:MasterDataController<Profile>
    {

        public override void InitDataController()
        {
            this.DBConn = new SqlConnection(DBConnection.ConnectionString);
            this.Procedures.Add(new Procedure("dbo.SearchProfiles", SQLCommandType.Select));
            this.Procedures.Add(new Procedure("dbo.SearchProfiles", SQLCommandType.GetSingleInfo));
            this.Procedures.Add(new Procedure("dbo.UpdateProfiles", SQLCommandType.Update));              
        }

       public Profile GetProfileInfo(Object ProfileId)
        {
            try
            {
                Int64 _ProfileId = Convert.ToInt64(ProfileId);
                this.SelectInfoParameters.Add("p_ProfileId", _ProfileId);
                return this.GetInfo();
            }
            catch (Exception ex) {
                throw ex;
            }
        }


    }

}
